package com.yuhong.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.yuhong.springbootinit.model.dto.analysis.PositionLocationResponse;
import com.yuhong.springbootinit.model.dto.analysis.PositionSalaryResponse;
import com.yuhong.springbootinit.model.dto.analysis.PositionStatusResponse;
import com.yuhong.springbootinit.model.dto.analysis.PositionTagResponse;
import com.yuhong.springbootinit.model.dto.position.PositionApplicationSimpleDTO;
import com.yuhong.springbootinit.model.dto.position.PositionQueryRequest;
import com.yuhong.springbootinit.model.entity.Position;
import com.yuhong.springbootinit.model.vo.PositionVO;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 10467
* @description 针对表【position】的数据库操作Service
* @createDate 2025-02-22 13:52:10
*/
public interface PositionService extends IService<Position> {

    void validPosition(Position position, boolean add);

    PositionVO getPositionVO(Position position, HttpServletRequest request) throws JsonProcessingException;

    Page<PositionVO> getPositionVOPage(Page<Position> positionPage, HttpServletRequest request);

    /**
     * 获取查询条件
     *
     * @param positionQueryRequest
     * @return
     */
    QueryWrapper<Position> getQueryWrapper(PositionQueryRequest positionQueryRequest);

    Position updatePositionStatus(Long id);

    PositionLocationResponse getLocationRatios();

    PositionStatusResponse getStatusRatios();

    PositionSalaryResponse getSalaryRatios();

    PositionTagResponse getTagRatios() throws JsonProcessingException;

    List<Position> getPositionListByCompanyId(String companyId);

    List<Position> getPositionsByUserId(String userId);

    List<PositionApplicationSimpleDTO> getSimpleApplicationCountByPosition(String userId);

}
